package com.lc.pianostudent.conn;

import com.google.gson.Gson;
import com.lc.pianostudent.bean.CircleBean;
import com.lc.pianostudent.bean.User;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/2/22.
 */
@HttpInlet(Conn.CIRCLE_INDEX)
public class PostCircleIndexTwo extends BaseAsyPost<CircleBean> {

    public String user_id,type;


    public PostCircleIndexTwo(AsyCallBack<CircleBean> asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected CircleBean parser(JSONObject object) throws Exception {

        TOAST = object.optString("message");
        if(object.optInt("code") == 200){

            Gson gson = new Gson();
            return gson.fromJson(object.toString(),CircleBean.class);
        }

        return null;
    }
}
